package exercise;

public class exercise04 {
    public static void main(String[] args) {

        int i = 0;
        while (i < 10){
            try {
                throw new Exception("抛出异常啦~");
            } catch (Exception e) {
                i++;
                e.printStackTrace();
                System.out.println("尝试连接第"+i+"次......");
            }
        }
        System.out.println("终于有网了！！！");
    }
}
